package com.varton;

import com.google.common.eventbus.EventBus;
import com.varton.observer.AskEvent;
import com.varton.observer.AskListener;
import com.varton.observer.Asker;


public class App {
    public static void main( String[] args ) {
        Asker asker = new Asker();
        AskListener listener = new AskListener();

        EventBus eventBus = new EventBus();
        eventBus.register(listener);

        String context = "穿山甲到底说了什么?";
        asker.submit(context);
        eventBus.post(new AskEvent(context));
    }
}
